﻿using System.Windows.Controls;
using nRoute.Components;

namespace nRoute.Samples.OfficerXcel.Views
{
    public partial class OptionsDialog : UserControl
	{
        private const string OPTIONS_PANEL0_URL = "Dialogs/SidePanels/CommonOptions";
        private const string OPTIONS_PANEL1_URL = "Dialogs/SidePanels/AdvancedOptions";
        
		public OptionsDialog()
		{
			// Required to initialize variables
			InitializeComponent();

		    this.SetRelayConverter<int, string>("UrlValueConverterRelay", 
                (s) =>
                    {
                        switch (s)
                        {
                            case 0:
                                return OPTIONS_PANEL0_URL;
                            case 1:
                                return OPTIONS_PANEL1_URL;
                            default:
                                return OPTIONS_PANEL0_URL;
                        }
                    });
		}
	}
}